<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
use think\facade\Route;


Route::group('user', function () {
    Route::post('login', 'User/login');
    Route::post('send_code', 'User/sendCode');
    Route::post('regist', 'User/regist');
});

Route::group(function () {
    Route::group('index', function () {
        Route::get('getUser', 'User/getUser');
    });
    Route::group('campus', function () {
        Route::post('addArticle', 'Campus/addArticle');
        Route::get('getCategory', 'Campus/getCategory');
        Route::get('getArticleList', 'Campus/getArticleList');
        Route::get('getArticleDetail', 'Campus/getArticleDetail');
        Route::get('search', 'Campus/search');
        Route::get('like', 'Campus/like');
    });
    Route::group('personal', function () {
        Route::post('edit', 'Personal/edit');
        Route::get('getMyArticle', 'Personal/getMyArticle');
        Route::get('getMyLike', 'Personal/getMyLike');
    });
})->middleware([\app\middleware\CheckToken::class]);
Route::group('campus', function () {
    Route::post('uploadImage', 'Campus/uploadImage');
    Route::post('deletedImage', 'Campus/deletedImage');
});
